<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	 <title><?php echo $page_title ?></title>
 	 <link rel="stylesheet" type="text/css" href="css/main.css" />
 	 <meta http-equiv="content-type" content="text/html;charset=utf-8" />
 	 <script type="text/javascript">
		var timeout	= 500;
		var closetimer	= 0;
		var ddmenuitem	= 0;

		// open hidden layer
		function mopen(id)
		{	
			// cancel close timer
			mcancelclosetime();
			// close old layer
			if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
			// get new layer and show it
			ddmenuitem = document.getElementById(id);
			ddmenuitem.style.visibility = 'visible';

		}
		// close showed layer
		function mclose()
		{
			if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
		}

		// go close timer
		function mclosetime()
		{
			closetimer = window.setTimeout(mclose, timeout);
		}

		// cancel close timer
		function mcancelclosetime()
		{
			if(closetimer)
			{
				window.clearTimeout(closetimer);
				closetimer = null;
			}
		}
		// close layer when click-out
		document.onclick = mclose; 
 	 </script>
 </head>
 <body><div class="bd">

	 <div id="header">
	 	 <h1>
	 	 	<img src="images/cube.jpg" />
	 	 	<a href="/MVC/"><?php echo SITE_NAME ?></a>
	 	 	<img src="images/cube.jpg" />
	 	 </h1>
	<br/>

	<!-- 显示菜单 -->
 	<ul id="sddm">
    	<li><a href="#" 
	        onmouseover="mopen('m1')" 
	        onmouseout="mclosetime()">文章分类</a>
	        <div id="m1" 
	            onmouseover="mcancelclosetime()" 
	            onmouseout="mclosetime()">
	        
			<?php for ($i = 0; $i < count($h_cate_ids); ++$i):?>
				<a href="/MVC/main/index/<?php echo $h_cate_ids[$i] ?>">
					<?php echo $h_cate_names[$i]; ?></a>
			<?php endfor; ?>

	        </div>
    	</li>
    	<li><a href="/MVC/post">发表文章</a></li>
	</ul>
	<br/>
	 	 <!-- <img src="images/darkside.png" /> -->
	 </div>
	 <br />
	 <div id="content"><!-- Start of the page-specific content. -->